package com.example.smartcity.utils

import android.content.Context
import android.util.Log
import android.widget.Toast
import com.example.smartcity.app.App


/**
 * @Author: Tailyou(祝文飞)
 * @CreateDate: 2021/10/7 14:54
 * @Description: Toast工具类
 */
class CommonUtil {

    companion object {
        fun showToast(context: Context, msg: String) {
            Toast.makeText(context, msg, Toast.LENGTH_SHORT).show()
        }

        fun loge(msg: String) {
            Log.e("SmartCityLog", msg)
        }

        fun isLogin(): Boolean {
            return App.appConfig.getString("token", "").isNullOrBlank()

        }
    }

}